package per.yhh.xxxtsj.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author yhh
 * @since 2022-04-10
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "Good对象", description = "")
public class Good implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "商品id")
    @TableId(value = "gid", type = IdType.AUTO)
    private Long gid;
    @ApiModelProperty(value = "商品名称")
    private String goodName;
    @ApiModelProperty(value = "所属用户id")
    private Long uid;
    @ApiModelProperty(value = "所属种类id")
    private Long catId;

    @ApiModelProperty(value = "单价")
    private BigDecimal price;


    @ApiModelProperty(value = "库存")
    private Integer stock;
    @ApiModelProperty(value = "描述")
    private String content;
    @ApiModelProperty(value = "/1 在售 /0 下架")
    private Boolean status;

    @ApiModelProperty(value = "逻辑删除")
    @TableLogic
    private Boolean deleted;

    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;


}
